from PyQt5 import QtCore, QtGui, QtWidgets
from util.click_fun import *
from PyQt5.QtWidgets import QTableWidget, QFileDialog
import pandas as pd
from util.sqlite_db import *


class guiAll():
    def __init__(self):
        super().__init__()

    def dialog_gui(self):
        self.dialogsef.setObjectName("Dialog")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("resource/favicon.ico"), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        icon.addPixmap(QtGui.QPixmap("resource/favicon.ico"), QtGui.QIcon.Normal,
                       QtGui.QIcon.On)
        self.dialogsef.setWindowIcon(icon)
        self.dialogsef.resize(1118, 700)
        self.tabWidget = QtWidgets.QTabWidget(
            self.dialogsef)  # 上面的tab框大组件(就是包含了那9个点击tab的组件)
        self.tabWidget.setGeometry(QtCore.QRect(0, 10, 1111, 471))
        self.tabWidget.setSizeIncrement(QtCore.QSize(0, 0))
        self.tabWidget.setElideMode(QtCore.Qt.ElideNone)
        self.tabWidget.setDocumentMode(False)
        self.tabWidget.setTabsClosable(False)
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")

    def userlist_gui(self):
        clickfun = clickFun()
        self.tableView_3 = QtWidgets.QTableView(self.tab)  # 账号登录列表那个tab的显示框
        self.tableView_3.setGeometry(QtCore.QRect(0, 0, 921, 441))
        self.tableView_3.setMidLineWidth(0)
        self.tableView_3.setObjectName("tableView_3")
        self.groupBox_7 = QtWidgets.QGroupBox(self.tab)  # 账号登录列表旁边的 groupBox
        self.groupBox_7.setGeometry(QtCore.QRect(930, 0, 161, 441))
        self.groupBox_7.setTitle("")
        self.groupBox_7.setObjectName("groupBox_7")
        self.pushButton_10 = QtWidgets.QPushButton(
            self.groupBox_7)  # Button类组件在 button_click_connect 下均有注释
        self.pushButton_10.setGeometry(QtCore.QRect(10, 20, 141, 31))
        self.pushButton_10.setObjectName("pushButton_10")
        self.pushButton_11 = QtWidgets.QPushButton(self.groupBox_7)
        self.pushButton_11.setGeometry(QtCore.QRect(10, 60, 141, 31))
        self.pushButton_11.setObjectName("pushButton_11")
        self.pushButton_12 = QtWidgets.QPushButton(self.groupBox_7)
        self.pushButton_12.setGeometry(QtCore.QRect(10, 100, 141, 31))
        self.pushButton_12.setObjectName("pushButton_12")
        self.pushButton_account_login1 = QtWidgets.QPushButton(self.groupBox_7)
        self.pushButton_account_login1.setGeometry(
            QtCore.QRect(10, 140, 141, 31))
        self.pushButton_account_login1.setObjectName(
            "pushButton_account_login1")
        self.pushButton_account_login1.setText('导入帐户')
        self.pushButton_account_login1.clicked.connect(lambda: clickfun.account_import(self))
        self.pushButton_account_login2 = QtWidgets.QPushButton(self.groupBox_7)
        self.pushButton_account_login2.setGeometry(
            QtCore.QRect(10, 180, 141, 31))
        self.pushButton_account_login2.setObjectName(
            "pushButton_account_login2")
        self.pushButton_account_login2.setText('导出帐户')
        self.pushButton_account_login2.clicked.connect(lambda: clickfun.account_export(self))
        self.pushButton_account_login3 = QtWidgets.QPushButton(self.groupBox_7)
        self.pushButton_account_login3.setGeometry(
            QtCore.QRect(10, 220, 141, 31))
        self.pushButton_account_login3.setObjectName(
            "pushButton_account_login3")
        self.pushButton_account_login3.setText('短信登录选中')
        self.pushButton_account_login3.clicked.connect(lambda: clickfun.sms_select(self))

        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.tableView = QtWidgets.QTableView(self.tab_2)
        self.tableView.setGeometry(QtCore.QRect(5, 1, 731, 331))
        self.tableView.setMidLineWidth(0)
        self.tableView.setObjectName("tableView")

    def userSignin_gui(self):
        self.tableWidget = QtWidgets.QTableWidget(
            self.tab_2)  # 第二个tab账号注册的外层显示框(最大的框组件)
        self.tableWidget.setGeometry(QtCore.QRect(0, 0, 1101, 441))
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(10)
        self.tableWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(3, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(4, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(5, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(6, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(7, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(8, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(9, item)
        self.tableWidget.horizontalHeader().setVisible(False)
        self.tableWidget.horizontalHeader().setCascadingSectionResizes(False)
        self.tableWidget.horizontalHeader().setDefaultSectionSize(120)
        self.tableWidget.verticalHeader().setDefaultSectionSize(40)
        self.tableWidget.verticalHeader().setSortIndicatorShown(False)
        self.tableWidget.verticalHeader().setStretchLastSection(False)
        self.groupBox_6 = QtWidgets.QGroupBox(
            self.tab_2)  # 第二个tab账号注册的左边的账号注册groupbux
        self.groupBox_6.setGeometry(QtCore.QRect(10, 10, 421, 401))
        self.groupBox_6.setObjectName("groupBox_6")
        self.lineEdit_12 = QtWidgets.QLineEdit(self.groupBox_6)  # 账号注册手机号码输入框
        self.lineEdit_12.setGeometry(QtCore.QRect(70, 20, 241, 20))
        self.lineEdit_12.setText("")
        self.lineEdit_12.setObjectName("lineEdit_12")
        self.pushButton_6 = QtWidgets.QPushButton(self.groupBox_6)
        self.pushButton_6.setGeometry(QtCore.QRect(220, 80, 91, 23))
        self.pushButton_6.setObjectName("pushButton_6")
        self.label_25 = QtWidgets.QLabel(self.groupBox_6)  # 手机号码 四个字的label
        self.label_25.setGeometry(QtCore.QRect(10, 20, 51, 16))
        self.label_25.setObjectName("label_25")
        self.label_26 = QtWidgets.QLabel(self.groupBox_6)  # 验证码 三个字label
        self.label_26.setGeometry(QtCore.QRect(10, 50, 51, 16))
        self.label_26.setObjectName("label_26")
        self.pushButton_15 = QtWidgets.QPushButton(self.groupBox_6)
        self.pushButton_15.setGeometry(QtCore.QRect(220, 50, 91, 23))
        self.pushButton_15.setObjectName("pushButton_15")
        self.lineEdit_18 = QtWidgets.QLineEdit(self.groupBox_6)  # 验证码输入框
        self.lineEdit_18.setGeometry(QtCore.QRect(70, 50, 111, 20))
        self.lineEdit_18.setText("")
        self.lineEdit_18.setEchoMode(QtWidgets.QLineEdit.Normal)
        self.lineEdit_18.setDragEnabled(False)
        self.lineEdit_18.setReadOnly(True)
        self.lineEdit_18.setObjectName("lineEdit_18")
        self.groupBox_9 = QtWidgets.QGroupBox(self.groupBox_6)  # 输出信息groupbox组
        self.groupBox_9.setGeometry(QtCore.QRect(10, 130, 391, 261))
        self.groupBox_9.setObjectName("groupBox_9")
        self.pushButton_18 = QtWidgets.QPushButton(self.groupBox_9)
        self.pushButton_18.setGeometry(QtCore.QRect(270, 230, 91, 23))
        self.pushButton_18.setObjectName("pushButton_18")
        self.listView = QtWidgets.QListView(self.groupBox_9)  # 输出信息的列表显示框
        self.listView.setGeometry(QtCore.QRect(30, 20, 341, 192))
        self.listView.setObjectName("listView")
        self.tabWidget.addTab(self.tab_2, "")
        self.tab_15 = QtWidgets.QWidget()
        self.tab_15.setObjectName("tab_15")

    def agent_gui(self):
        self.tableWidget_2 = QtWidgets.QTableWidget(self.tab_15)
        self.tableWidget_2.setGeometry(QtCore.QRect(0, 0, 1101, 451))
        self.tableWidget_2.setObjectName("tableWidget_2")
        self.tableWidget_2.setColumnCount(0)
        self.tableWidget_2.setRowCount(0)
        self.tableWidget_2.horizontalHeader().setDefaultSectionSize(120)
        self.groupBox = QtWidgets.QGroupBox(self.tab_15)
        self.groupBox.setGeometry(QtCore.QRect(10, 10, 1051, 441))
        self.groupBox.setTitle("")
        self.groupBox.setObjectName("groupBox")
        self.groupBox_2 = QtWidgets.QGroupBox(self.groupBox)  # 矿代理左边显示那个组
        self.groupBox_2.setGeometry(QtCore.QRect(10, 30, 341, 401))
        self.groupBox_2.setObjectName("groupBox_2")
        self.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit_2.setGeometry(QtCore.QRect(90, 20, 201, 20))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.label = QtWidgets.QLabel(self.groupBox_2)
        self.label.setGeometry(QtCore.QRect(10, 20, 51, 16))
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.groupBox_2)
        self.label_2.setGeometry(QtCore.QRect(10, 50, 51, 16))
        self.label_2.setObjectName("label_2")
        self.checkBox_5 = QtWidgets.QCheckBox(self.groupBox_2)
        self.checkBox_5.setGeometry(QtCore.QRect(10, 100, 101, 51))
        self.checkBox_5.setAcceptDrops(False)
        self.checkBox_5.setChecked(True)
        self.checkBox_5.setObjectName("checkBox_5")
        self.label_17 = QtWidgets.QLabel(self.groupBox_2)
        self.label_17.setGeometry(QtCore.QRect(260, 110, 71, 41))
        self.label_17.setObjectName("label_17")
        self.lineEdit_3 = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit_3.setGeometry(QtCore.QRect(90, 50, 201, 20))
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.groupBox_4 = QtWidgets.QGroupBox(self.groupBox_2)
        self.groupBox_4.setGeometry(QtCore.QRect(10, 160, 321, 171))
        self.groupBox_4.setObjectName("groupBox_4")
        self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_4)
        self.pushButton_2.setGeometry(QtCore.QRect(10, 20, 71, 31))
        self.pushButton_2.setObjectName("pushButton_2")
        self.groupBox_5 = QtWidgets.QGroupBox(self.groupBox_4)
        self.groupBox_5.setGeometry(QtCore.QRect(90, 20, 221, 141))
        self.groupBox_5.setObjectName("groupBox_5")
        self.textEdit = QtWidgets.QTextEdit(self.groupBox_5)  # 测试提取列表
        self.textEdit.setGeometry(QtCore.QRect(10, 20, 211, 121))
        self.textEdit.setObjectName("textEdit")
        self.label_34 = QtWidgets.QLabel(self.groupBox_2)
        self.label_34.setGeometry(QtCore.QRect(260, 120, 71, 20))
        self.label_34.setText("")
        self.label_34.setObjectName("label_34")
        self.pushButton = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButton.setGeometry(QtCore.QRect(180, 110, 71, 41))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_20 = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButton_20.setGeometry(QtCore.QRect(10, 340, 71, 31))
        self.pushButton_20.setObjectName("pushButton_20")
        self.label_45 = QtWidgets.QLabel(self.groupBox_2)
        self.label_45.setGeometry(QtCore.QRect(100, 339, 231, 31))
        self.label_45.setObjectName("label_45")
        self.groupBox_3 = QtWidgets.QGroupBox(self.groupBox)
        self.groupBox_3.setGeometry(QtCore.QRect(370, 30, 321, 401))
        self.groupBox_3.setObjectName("groupBox_3")
        self.label_18 = QtWidgets.QLabel(self.groupBox_3)
        self.label_18.setGeometry(QtCore.QRect(10, 20, 311, 31))
        self.label_18.setAcceptDrops(False)
        self.label_18.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_18.setObjectName("label_18")
        self.label_21 = QtWidgets.QLabel(self.groupBox_3)
        self.label_21.setGeometry(QtCore.QRect(10, 50, 311, 31))
        self.label_21.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_21.setObjectName("label_21")
        self.label_22 = QtWidgets.QLabel(self.groupBox_3)
        self.label_22.setGeometry(QtCore.QRect(10, 80, 311, 31))
        self.label_22.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_22.setObjectName("label_22")
        self.label_23 = QtWidgets.QLabel(self.groupBox_3)
        self.label_23.setGeometry(QtCore.QRect(10, 110, 311, 31))
        self.label_23.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_23.setObjectName("label_23")
        self.label_24 = QtWidgets.QLabel(self.groupBox_3)
        self.label_24.setGeometry(QtCore.QRect(10, 140, 311, 31))
        self.label_24.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_24.setObjectName("label_24")
        self.label_33 = QtWidgets.QLabel(self.groupBox_3)
        self.label_33.setGeometry(QtCore.QRect(10, 170, 311, 31))
        self.label_33.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_33.setTextFormat(QtCore.Qt.PlainText)
        self.label_33.setWordWrap(False)
        self.label_33.setContentsMargins(1, 1, 1, 1)
        self.label_33.setObjectName("label_33")
        self.label_35 = QtWidgets.QLabel(self.groupBox_3)
        self.label_35.setGeometry(QtCore.QRect(10, 200, 311, 31))
        self.label_35.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_35.setTextFormat(QtCore.Qt.PlainText)
        self.label_35.setWordWrap(False)
        self.label_35.setContentsMargins(1, 1, 1, 1)
        self.label_35.setObjectName("label_35")
        self.label_36 = QtWidgets.QLabel(self.groupBox_3)
        self.label_36.setGeometry(QtCore.QRect(10, 230, 311, 31))
        self.label_36.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_36.setTextFormat(QtCore.Qt.PlainText)
        self.label_36.setWordWrap(False)
        self.label_36.setContentsMargins(1, 1, 1, 1)
        self.label_36.setObjectName("label_36")
        self.groupBox_15 = QtWidgets.QGroupBox(self.groupBox)
        self.groupBox_15.setGeometry(QtCore.QRect(720, 30, 321, 401))
        self.groupBox_15.setObjectName("groupBox_15")
        self.tableView_18 = QtWidgets.QTableView(self.groupBox_15)  # 代理列表显示
        self.tableView_18.setGeometry(QtCore.QRect(10, 20, 301, 361))
        self.tableView_18.setObjectName("tableView_18")
        self.tabWidget.addTab(self.tab_15, "")
        self.tab_22 = QtWidgets.QWidget()
        self.tab_22.setObjectName("tab_22")

    def batchadd_gui(self):
        clickfun = clickFun()
        self.tableView_11 = QtWidgets.QTableView(self.tab_22)  # 地址列表显示
        self.tableView_11.setGeometry(QtCore.QRect(0, 0, 611, 451))
        self.tableView_11.setObjectName("tableView_11")
        self.tableView_11.horizontalHeader().setMinimumSectionSize(120)
        self.groupBox_8 = QtWidgets.QGroupBox(self.tab_22)  # 添加收获地址组
        self.groupBox_8.setGeometry(QtCore.QRect(620, 20, 471, 411))
        self.groupBox_8.setObjectName("groupBox_8")
        self.groupBox_28 = QtWidgets.QGroupBox(self.groupBox_8)
        self.groupBox_28.setGeometry(QtCore.QRect(20, 30, 441, 261))
        self.groupBox_28.setObjectName("groupBox_28")
        self.label_37 = QtWidgets.QLabel(self.groupBox_28)
        self.label_37.setGeometry(QtCore.QRect(20, 20, 41, 16))
        self.label_37.setObjectName("label_37")
        self.label_38 = QtWidgets.QLabel(self.groupBox_28)
        self.label_38.setGeometry(QtCore.QRect(310, 20, 101, 16))
        self.label_38.setObjectName("label_38")
        self.label_39 = QtWidgets.QLabel(self.groupBox_28)
        self.label_39.setGeometry(QtCore.QRect(20, 50, 31, 16))
        self.label_39.setObjectName("label_39")
        self.label_40 = QtWidgets.QLabel(self.groupBox_28)
        self.label_40.setGeometry(QtCore.QRect(20, 140, 61, 16))
        self.label_40.setObjectName("label_40")
        self.lineEdit = QtWidgets.QLineEdit(self.groupBox_28)
        self.lineEdit.setGeometry(QtCore.QRect(70, 140, 361, 20))
        self.lineEdit.setObjectName("lineEdit")
        self.label_41 = QtWidgets.QLabel(self.groupBox_28)
        self.label_41.setGeometry(QtCore.QRect(10, 80, 51, 20))
        self.label_41.setObjectName("label_41")
        self.lineEdit_11 = QtWidgets.QLineEdit(self.groupBox_28)
        self.lineEdit_11.setGeometry(QtCore.QRect(70, 20, 201, 20))
        self.lineEdit_11.setObjectName("lineEdit_11")
        self.lineEdit_13 = QtWidgets.QLineEdit(self.groupBox_28)
        self.lineEdit_13.setGeometry(QtCore.QRect(70, 50, 201, 20))
        self.lineEdit_13.setText("")
        self.lineEdit_13.setObjectName("lineEdit_13")
        self.lineEdit_14 = QtWidgets.QLineEdit(self.groupBox_28)
        self.lineEdit_14.setGeometry(QtCore.QRect(70, 80, 201, 20))
        self.lineEdit_14.setObjectName("lineEdit_14")
        self.label_42 = QtWidgets.QLabel(self.groupBox_28)
        self.label_42.setGeometry(QtCore.QRect(310, 50, 151, 20))
        self.label_42.setObjectName("label_42")
        self.label_43 = QtWidgets.QLabel(self.groupBox_28)
        self.label_43.setGeometry(QtCore.QRect(310, 80, 131, 20))
        self.label_43.setObjectName("label_43")
        self.label_44 = QtWidgets.QLabel(self.groupBox_28)
        self.label_44.setGeometry(QtCore.QRect(10, 110, 51, 20))
        self.label_44.setObjectName("label_44")
        self.pushButton_19 = QtWidgets.QPushButton(self.groupBox_28)
        self.pushButton_19.setGeometry(QtCore.QRect(70, 170, 101, 31))
        self.pushButton_19.setObjectName("pushButton_19")

        self.pushButton_19_all = QtWidgets.QPushButton(self.groupBox_28)
        self.pushButton_19_all.setGeometry(QtCore.QRect(190, 170, 101, 31))
        self.pushButton_19_all.setObjectName("pushButton_19_all")

        self.label_52 = QtWidgets.QLabel(self.groupBox_28)
        self.label_52.setGeometry(QtCore.QRect(310, 110, 131, 20))
        self.label_52.setObjectName("label_52")
        self.comboBox_2 = QtWidgets.QComboBox(self.groupBox_28)
        self.comboBox_2.setGeometry(QtCore.QRect(68, 110, 201, 22))
        self.comboBox_2.setObjectName("comboBox_2")
        self.tabWidget.addTab(self.tab_22, "")
        # 批量添加收货地址
        self.groupBox_batch_address = QtWidgets.QGroupBox(self.tab_22)
        self.groupBox_batch_address.setGeometry(
            QtCore.QRect(620, 270, 471, 150))
        self.groupBox_batch_address.setObjectName("groupBox_batch_address")
        self.groupBox_batch_address.setTitle('批量添加收货地址 ')
        self.qle_groupBox_batch_address = QtWidgets.QLineEdit(
            self.groupBox_batch_address)  # 在批量添加收货地 groupbox中添加lineedit
        self.qle_groupBox_batch_address.setGeometry(
            QtCore.QRect(18, 30, 440, 30))
        self.button_select_batch_address = QtWidgets.QPushButton(
            self.groupBox_batch_address)  # 在实名认证 groupbox中添加button
        self.button_select_batch_address.setText("请选择批量地址文件")
        self.button_select_batch_address.clicked.connect(lambda: clickfun.select_batch_address(self))
        self.button_select_batch_address.setGeometry(
            QtCore.QRect(38, 80, 130, 25))
        self.button_batch_address_import = QtWidgets.QPushButton(
            self.groupBox_batch_address)  # 在实名认证 groupbox中添加button
        self.button_batch_address_import.setText("批量地址导入")
        self.button_batch_address_import.clicked.connect(lambda: clickfun.batch_address_import(self))
        self.button_batch_address_import.setGeometry(
            QtCore.QRect(320, 80, 130, 25))
        self.tab_20 = QtWidgets.QWidget()
        self.tab_20.setObjectName("tab_20")

    def realname_gui(self):
        self.groupBox_11 = QtWidgets.QGroupBox(self.tab_20)
        self.groupBox_11.setGeometry(QtCore.QRect(760, 40, 0, 0))
        self.groupBox_11.setCheckable(False)
        self.groupBox_11.setObjectName("groupBox_11")
        self.tableWidget_17 = QtWidgets.QTableWidget(self.groupBox_11)
        self.tableWidget_17.setGeometry(QtCore.QRect(10, 20, 411, 401))
        self.tableWidget_17.setObjectName("tableWidget_17")
        self.tableWidget_17.setColumnCount(3)
        self.tableWidget_17.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_17.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_17.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_17.setHorizontalHeaderItem(2, item)
        self.tableWidget_17.horizontalHeader().setDefaultSectionSize(150)
        self.tableWidget_17.horizontalHeader().setHighlightSections(True)
        self.groupBox_13 = QtWidgets.QGroupBox(self.groupBox_11)
        self.groupBox_13.setGeometry(QtCore.QRect(460, 200, 191, 181))
        self.groupBox_13.setObjectName("groupBox_13")
        self.pushButton_27 = QtWidgets.QPushButton(self.groupBox_13)
        self.pushButton_27.setGeometry(QtCore.QRect(40, 20, 91, 31))
        self.pushButton_27.setObjectName("pushButton_27")
        self.pushButton_28 = QtWidgets.QPushButton(self.groupBox_13)
        self.pushButton_28.setGeometry(QtCore.QRect(40, 60, 91, 31))
        self.pushButton_28.setObjectName("pushButton_28")
        self.pushButton_29 = QtWidgets.QPushButton(self.groupBox_13)
        self.pushButton_29.setGeometry(QtCore.QRect(40, 100, 91, 31))
        self.pushButton_29.setObjectName("pushButton_29")
        self.pushButton_30 = QtWidgets.QPushButton(self.groupBox_13)
        self.pushButton_30.setGeometry(QtCore.QRect(40, 140, 91, 31))
        self.pushButton_30.setObjectName("pushButton_30")
        self.groupBox_14 = QtWidgets.QGroupBox(self.tab_20)
        self.groupBox_14.setGeometry(QtCore.QRect(10, 10, 1050, 431))
        self.groupBox_14.setObjectName("groupBox_14")
        self.tableView_12 = QtWidgets.QTableView(self.groupBox_14)  # 未实名用户列表
        self.tableView_12.setGeometry(QtCore.QRect(20, 20, 131, 401))
        self.tableView_12.setObjectName("tableView_12")
        self.tableView_12.horizontalHeader().setMinimumSectionSize(130)
        self.groupBox_12 = QtWidgets.QGroupBox(self.groupBox_14)  # 添加实名信息框
        self.groupBox_12.setGeometry(QtCore.QRect(180, 20, 221, 401))
        self.groupBox_12.setObjectName("groupBox_12")

        ################################################################
        self.label_29 = QtWidgets.QLabel(self.groupBox_12)
        self.label_29.setGeometry(QtCore.QRect(10, 20, 91, 16))
        self.label_29.setObjectName("label_29")
        self.lineEdit_6 = QtWidgets.QLineEdit(self.groupBox_12)
        self.lineEdit_6.setGeometry(QtCore.QRect(10, 40, 191, 20))
        self.lineEdit_6.setObjectName("lineEdit_6")
        self.label_30 = QtWidgets.QLabel(self.groupBox_12)
        self.label_30.setGeometry(QtCore.QRect(10, 70, 91, 16))
        self.label_30.setObjectName("label_30")
        self.lineEdit_5 = QtWidgets.QLineEdit(self.groupBox_12)
        self.lineEdit_5.setGeometry(QtCore.QRect(10, 90, 191, 20))
        self.lineEdit_5.setObjectName("lineEdit_5")
        self.pushButton_16 = QtWidgets.QPushButton(self.groupBox_12)
        self.pushButton_16.setGeometry(QtCore.QRect(80, 190, 91, 31))
        self.pushButton_16.setObjectName("pushButton_16")
        self.label_46 = QtWidgets.QLabel(self.groupBox_12)
        self.label_46.setGeometry(QtCore.QRect(10, 120, 181, 16))
        self.label_46.setObjectName("label_46")
        self.comboBox = QtWidgets.QComboBox(self.groupBox_12)
        self.comboBox.setGeometry(QtCore.QRect(10, 150, 191, 22))
        self.comboBox.setObjectName("comboBox")
        self.tabWidget.addTab(self.tab_20, "")
        self.tab_23 = QtWidgets.QWidget()
        self.tab_23.setObjectName("tab_23")

    def add_realname_gui(self):
        # 添加实名认证 groupbox
        clickfun = clickFun()
        self.groupBox_real_name = QtWidgets.QGroupBox(self.groupBox_14)
        self.groupBox_real_name.setGeometry(QtCore.QRect(430, 20, 600, 401))
        self.groupBox_real_name.setObjectName("groupBox_real_name")
        self.groupBox_real_name.setTitle('批量实名认证')
        self.tableWidget_groupBox_real_name = QtWidgets.QTableWidget(
            self.groupBox_real_name)  # 在实名认证 groupbox中添加QTableWidget
        horizontalHeader = ['姓名', '身份证号码', '手机号']
        colunmwidth = 100
        self.tableWidget_groupBox_real_name.setColumnCount(
            len(horizontalHeader))
        # self.tableWidget_groupBox_real_name.setRowCount(5)
        self.tableWidget_groupBox_real_name.setRowHeight(0, 10)
        self.tableWidget_groupBox_real_name.setHorizontalHeaderLabels(
            horizontalHeader)
        self.tableWidget_groupBox_real_name.setEditTriggers(
            QTableWidget.NoEditTriggers)
        self.tableWidget_groupBox_real_name.setSelectionBehavior(
            QTableWidget.SelectRows)
        self.tableWidget_groupBox_real_name.setSelectionMode(
            QTableWidget.SingleSelection)
        # self.tableWidget_groupBox_real_name.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch) # 自适应
        # self.tableWidget_groupBox_real_name.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
        # self.tableWidget_groupBox_real_name.verticalHeader().setSectionResizeMode(QHeaderView.Stretch) # 自适应
        self.tableWidget_groupBox_real_name.setColumnWidth(0, 65)
        self.tableWidget_groupBox_real_name.setColumnWidth(1, 180)
        self.tableWidget_groupBox_real_name.setColumnWidth(2, 130)
        self.tableWidget_groupBox_real_name.setGeometry(
            QtCore.QRect(10, 20, 400, 460))
        self.qle_groupBox_real_name = QtWidgets.QLineEdit(
            self.groupBox_real_name)  # 在实名认证 groupbox中添加lineedit
        self.qle_groupBox_real_name.setGeometry(QtCore.QRect(
            420, 100, 170, 30))
        self.button_select_identificaion_file = QtWidgets.QPushButton(
            self.groupBox_real_name)  # 在实名认证 groupbox中添加button
        self.button_select_identificaion_file.setText("请选择认证文件")
        self.button_select_identificaion_file.clicked.connect(lambda: clickfun.select_identificaion_file(self))
        self.button_select_identificaion_file.setGeometry(
            QtCore.QRect(420, 150, 100, 30))
        self.button_identify = QtWidgets.QPushButton(
            self.groupBox_real_name)  # 在实名认证 groupbox中添加button
        self.button_identify.setText("批量认证")
        self.button_identify.setGeometry(QtCore.QRect(530, 150, 60, 30))
        self.button_identify.clicked.connect(lambda: clickfun.batch_identify(self))

    def order_gui(self):
        clickfun = clickFun()
        self.groupBox_normal_order = QtWidgets.QGroupBox(self.tab_23)
        self.groupBox_normal_order.setGeometry(QtCore.QRect(0, 0, 890, 30))
        self.groupBox_normal_order.setCheckable(False)
        self.label_normal_order = QtWidgets.QLabel(self.groupBox_normal_order)
        self.label_normal_order.setGeometry(QtCore.QRect(3, 5, 61, 21))
        self.label_normal_order.setAlignment(QtCore.Qt.AlignCenter)
        self.label_normal_order.setObjectName("label_normal_order")
        self.lineEdit_normal_order = QtWidgets.QLineEdit(
            self.groupBox_normal_order)
        self.lineEdit_normal_order.setGeometry(QtCore.QRect(60, 5, 91, 21))  # 商品ID输入
        self.lineEdit_normal_order.setObjectName("lineEdit_normal_order")
        self.label_2_normal_order = QtWidgets.QLabel(
            self.groupBox_normal_order)
        self.label_2_normal_order.setGeometry(QtCore.QRect(150, 5, 61, 21))  # 商品数量输入
        self.label_2_normal_order.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2_normal_order.setObjectName("label_2_normal_order")
        self.lineEdit_2_normal_order = QtWidgets.QLineEdit(
            self.groupBox_normal_order)
        self.lineEdit_2_normal_order.setGeometry(QtCore.QRect(220, 5, 71, 21))
        self.lineEdit_2_normal_order.setObjectName("lineEdit_2")
        self.pushButton_1_normal_order = QtWidgets.QPushButton(
            self.groupBox_normal_order)
        self.pushButton_1_normal_order.setGeometry(QtCore.QRect(
            370, 5, 81, 23))
        self.pushButton_1_normal_order.setDefault(False)
        self.pushButton_1_normal_order.setFlat(False)
        self.pushButton_1_normal_order.setObjectName(
            "pushButton_15_normal_orde")
        self.pushButton_1_normal_order.clicked.connect(lambda: clickfun.select_surveillance_order(self))
        self.pushButton_2_normal_order = QtWidgets.QPushButton(
            self.groupBox_normal_order)
        self.pushButton_2_normal_order.setGeometry(QtCore.QRect(
            450, 5, 81, 23))
        self.pushButton_2_normal_order.setDefault(False)
        self.pushButton_2_normal_order.setFlat(False)
        self.pushButton_2_normal_order.setObjectName(
            "pushButton_16_normal_orde")
        self.pushButton_2_normal_order.clicked.connect(lambda: clickfun.stop_surveillance(self))
        self.pushButton_3_normal_order = QtWidgets.QPushButton(
            self.groupBox_normal_order)
        self.pushButton_3_normal_order.setGeometry(QtCore.QRect(
            530, 5, 51, 23))
        self.pushButton_3_normal_order.setDefault(False)
        self.pushButton_3_normal_order.setFlat(False)
        self.pushButton_3_normal_order.setObjectName(
            "pushButton_17_normal_orde")
        self.pushButton_3_normal_order.clicked.connect(lambda: clickfun.order_export(self))
        self.pushButton_4_normal_order = QtWidgets.QPushButton(
            self.groupBox_normal_order)
        self.pushButton_4_normal_order.setGeometry(QtCore.QRect(
            580, 5, 51, 23))
        self.pushButton_4_normal_order.setDefault(False)
        self.pushButton_4_normal_order.setFlat(False)
        self.pushButton_4_normal_order.setObjectName("pushButton_18_normal_orde")
        self.pushButton_4_normal_order.clicked.connect(lambda: clickfun.order_clear(self))
        self.lineEdit_3_normal_order = QtWidgets.QLineEdit(
            self.groupBox_normal_order)
        self.lineEdit_3_normal_order.setGeometry(QtCore.QRect(740, 5, 91, 21))
        self.lineEdit_3_normal_order.setObjectName("lineEdit_3_normal_orde")
        self.tableView_15 = QtWidgets.QTableView(self.tab_23)  # 订单列表
        self.tableView_15.setGeometry(QtCore.QRect(0, 30, 890, 441))
        self.tableView_15.setObjectName("tableView_15")

        self.tableView_15_list_name = QtWidgets.QTableWidget(self.tableView_15)
        tableView_15_list_Header = ['帐号', '创建时间', '订单号', '收货信息', '商品信息', '状态', '物流/支付号']
        self.tableView_15_list_name.setColumnCount(
            len(tableView_15_list_Header))
        self.tableView_15_list_name.setHorizontalHeaderLabels(
            tableView_15_list_Header)
        self.tableView_15_list_name.setRowHeight(0, 10)
        self.tableView_15_list_name.setGeometry(
            QtCore.QRect(0, 0, 890, 460))
        # self.tableView_15_list_name.setColumnWidth(1, 280)
        self.groupBox_19 = QtWidgets.QGroupBox(self.tab_23)  # 右边的筛选
        self.groupBox_19.setGeometry(QtCore.QRect(900, 10, 161, 431))
        self.groupBox_19.setObjectName("groupBox_19")
        self.pushButton_17 = QtWidgets.QPushButton(self.groupBox_19)
        self.pushButton_17.setGeometry(QtCore.QRect(10, 20, 141, 31))
        self.pushButton_17.setObjectName("pushButton_17")
        self.pushButton_23 = QtWidgets.QPushButton(self.groupBox_19)
        self.pushButton_23.setGeometry(QtCore.QRect(10, 60, 141, 31))
        self.pushButton_23.setObjectName("pushButton_23")
        self.pushButton_25 = QtWidgets.QPushButton(self.groupBox_19)
        self.pushButton_25.setGeometry(QtCore.QRect(10, 100, 141, 31))
        self.pushButton_25.setObjectName("pushButton_25")
        self.pushButton_31 = QtWidgets.QPushButton(self.groupBox_19)
        self.pushButton_31.setGeometry(QtCore.QRect(10, 140, 141, 31))
        self.pushButton_31.setObjectName("pushButton_31")
        self.pushButton_33 = QtWidgets.QPushButton(self.groupBox_19)
        self.pushButton_33.setGeometry(QtCore.QRect(10, 180, 141, 31))
        self.pushButton_33.setObjectName("pushButton_33")
        self.tabWidget.addTab(self.tab_23, "")
        self.tab_5 = QtWidgets.QWidget()
        self.tab_5.setObjectName("tab_5")

    def reservation_gui(self):
        self.tableView_19 = QtWidgets.QTableView(self.tab_5)  # 查到的货品数据
        self.tableView_19.setGeometry(QtCore.QRect(10, 10, 521, 411))
        self.tableView_19.setObjectName("tableView_19")
        self.groupBox_16 = QtWidgets.QGroupBox(self.tab_5)  # 中间的那些按钮输入框组
        self.groupBox_16.setGeometry(QtCore.QRect(540, 10, 221, 411))
        self.groupBox_16.setTitle("")
        self.groupBox_16.setObjectName("groupBox_16")
        self.pushButton_21 = QtWidgets.QPushButton(self.groupBox_16)
        self.pushButton_21.setGeometry(QtCore.QRect(10, 10, 201, 51))
        self.pushButton_21.setObjectName("pushButton_21")
        self.pushButton_22 = QtWidgets.QPushButton(self.groupBox_16)
        self.pushButton_22.setGeometry(QtCore.QRect(10, 340, 201, 61))
        self.pushButton_22.setObjectName("pushButton_22")
        self.label_47 = QtWidgets.QLabel(self.groupBox_16)
        self.label_47.setGeometry(QtCore.QRect(10, 230, 81, 16))
        self.label_47.setObjectName("label_47")
        self.label_48 = QtWidgets.QLabel(self.groupBox_16)
        self.label_48.setGeometry(QtCore.QRect(10, 170, 81, 16))
        self.label_48.setObjectName("label_48")
        self.lineEdit_16 = QtWidgets.QLineEdit(self.groupBox_16)
        self.lineEdit_16.setGeometry(QtCore.QRect(10, 190, 201, 31))
        self.lineEdit_16.setObjectName("lineEdit_16")
        self.label_49 = QtWidgets.QLabel(self.groupBox_16)
        self.label_49.setGeometry(QtCore.QRect(10, 100, 81, 16))
        self.label_49.setObjectName("label_49")
        self.comboBox_3 = QtWidgets.QComboBox(self.groupBox_16)
        self.comboBox_3.setGeometry(QtCore.QRect(10, 130, 201, 31))
        self.comboBox_3.setObjectName("comboBox_3")
        self.label_3 = QtWidgets.QLabel(self.groupBox_16)
        self.label_3.setGeometry(QtCore.QRect(40, 60, 111, 21))
        self.label_3.setObjectName("label_3")
        self.comboBox_4 = QtWidgets.QComboBox(self.groupBox_16)
        self.comboBox_4.setGeometry(QtCore.QRect(10, 260, 201, 51))
        self.comboBox_4.setCurrentText("")
        self.comboBox_4.setObjectName("comboBox_4")
        self.groupBox_18 = QtWidgets.QGroupBox(self.tab_5)  # 右边的选中账号
        self.groupBox_18.setGeometry(QtCore.QRect(780, 10, 321, 421))
        self.groupBox_18.setObjectName("groupBox_18")
        self.tableView_20 = QtWidgets.QTableView(self.groupBox_18)
        self.tableView_20.setGeometry(QtCore.QRect(10, 20, 311, 391))
        self.tableView_20.setObjectName("tableView_20")
        self.tableView_20.horizontalHeader().setDefaultSectionSize(150)
        self.tabWidget.addTab(self.tab_5, "")
        self.tab_6 = QtWidgets.QWidget()
        self.tab_6.setObjectName("tab_6")
        ########################### 已预约 ################################
        self.groupBox_17 = QtWidgets.QGroupBox(self.tab_6)  # 右边的监控配置组
        self.groupBox_17.setGeometry(QtCore.QRect(890, 0, 201, 441))
        self.groupBox_17.setTitle("")
        self.groupBox_17.setObjectName("groupBox_17")
        self.groupBox_20 = QtWidgets.QGroupBox(self.groupBox_17)
        self.groupBox_20.setGeometry(QtCore.QRect(10, 10, 171, 271))
        self.groupBox_20.setObjectName("groupBox_20")
        self.label_31 = QtWidgets.QLabel(self.groupBox_20)
        self.label_31.setGeometry(QtCore.QRect(10, 20, 161, 16))
        self.label_31.setObjectName("label_31")
        self.lineEdit_8 = QtWidgets.QLineEdit(self.groupBox_20)
        self.lineEdit_8.setGeometry(QtCore.QRect(10, 40, 101, 20))
        self.lineEdit_8.setObjectName("lineEdit_8")
        self.pushButton_24 = QtWidgets.QPushButton(self.groupBox_20)
        self.pushButton_24.setGeometry(QtCore.QRect(10, 130, 101, 31))
        self.pushButton_24.setObjectName("pushButton_24")
        self.pushButton_26 = QtWidgets.QPushButton(self.groupBox_20)
        self.pushButton_26.setGeometry(QtCore.QRect(10, 170, 101, 31))
        self.pushButton_26.setObjectName("pushButton_26")
        self.label_51 = QtWidgets.QLabel(self.groupBox_20)
        self.label_51.setGeometry(QtCore.QRect(10, 70, 161, 16))
        self.label_51.setObjectName("label_51")
        self.lineEdit_9 = QtWidgets.QLineEdit(self.groupBox_20)
        self.lineEdit_9.setGeometry(QtCore.QRect(10, 90, 101, 20))
        self.lineEdit_9.setObjectName("lineEdit_9")
        self.label_32 = QtWidgets.QLabel(self.groupBox_20)
        self.label_32.setGeometry(QtCore.QRect(10, 210, 71, 20))
        self.label_32.setObjectName("label_32")
        self.label_50 = QtWidgets.QLabel(self.groupBox_20)
        self.label_50.setGeometry(QtCore.QRect(80, 210, 71, 20))
        self.label_50.setObjectName("label_50")
        self.checkBox_6 = QtWidgets.QCheckBox(self.groupBox_20)
        self.checkBox_6.setGeometry(QtCore.QRect(10, 220, 161, 51))
        self.checkBox_6.setAcceptDrops(False)
        self.checkBox_6.setChecked(True)
        self.checkBox_6.setObjectName("checkBox_6")
        self.groupBox_21 = QtWidgets.QGroupBox(self.groupBox_17)
        self.groupBox_21.setGeometry(QtCore.QRect(10, 280, 171, 161))
        self.groupBox_21.setObjectName("groupBox_21")
        self.pushButton_32 = QtWidgets.QPushButton(self.groupBox_21)
        self.pushButton_32.setGeometry(QtCore.QRect(10, 80, 101, 31))
        self.pushButton_32.setObjectName("pushButton_32")
        self.label_54 = QtWidgets.QLabel(self.groupBox_21)
        self.label_54.setGeometry(QtCore.QRect(10, 20, 161, 16))
        self.label_54.setObjectName("label_54")
        self.dateTimeEdit = QtWidgets.QDateTimeEdit(self.groupBox_21)
        self.dateTimeEdit.setGeometry(QtCore.QRect(10, 50, 131, 22))
        self.dateTimeEdit.setDateTime(
            QtCore.QDateTime(QtCore.QDate(2022, 1, 2), QtCore.QTime(1, 1, 1)))
        self.dateTimeEdit.setObjectName("dateTimeEdit")
        self.pushButton_34 = QtWidgets.QPushButton(self.groupBox_21)
        self.pushButton_34.setGeometry(QtCore.QRect(10, 120, 101, 31))
        self.pushButton_34.setObjectName("pushButton_34")
        self.tableView_5 = QtWidgets.QTableView(self.tab_6)  # 已预约列表
        self.tableView_5.setGeometry(QtCore.QRect(0, 0, 881, 441))
        self.tableView_5.setMidLineWidth(0)
        self.tableView_5.setObjectName("tableView_5")
        self.tabWidget.addTab(self.tab_6, "")
        self.tab_7 = QtWidgets.QWidget()
        self.tab_7.setObjectName("tab_7")

    def agent_payment_gui(self):
        self.tableView_21 = QtWidgets.QTableView(self.tab_7)  # 代付款列表
        self.tableView_21.setGeometry(QtCore.QRect(0, 0, 741, 441))
        self.tableView_21.setObjectName("tableView_21")
        self.tabWidget.addTab(self.tab_7, "")
        ########################### 下面的输出框 ################################
        self.tabWidget_2 = QtWidgets.QTabWidget(self.dialogsef)
        self.tabWidget_2.setGeometry(QtCore.QRect(0, 480, 1111, 191))
        self.tabWidget_2.setSizeIncrement(QtCore.QSize(0, 0))
        self.tabWidget_2.setElideMode(QtCore.Qt.ElideNone)
        self.tabWidget_2.setDocumentMode(False)
        self.tabWidget_2.setTabsClosable(False)
        self.tabWidget_2.setObjectName("tabWidget_2")
        self.tab_3 = QtWidgets.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.listView_4 = QtWidgets.QListView(self.tab_3)
        self.listView_4.setGeometry(QtCore.QRect(0, 0, 1111, 171))
        self.listView_4.setMidLineWidth(0)
        self.listView_4.setObjectName("listView_4")
        self.tabWidget_2.addTab(self.tab_3, "")
        self.tab_4 = QtWidgets.QWidget()
        self.tab_4.setObjectName("tab_4")
        self.listView_2 = QtWidgets.QListView(self.tab_4)
        self.listView_2.setGeometry(QtCore.QRect(0, 0, 1091, 171))
        self.listView_2.setObjectName("listView_2")
        self.tabWidget_2.addTab(self.tab_4, "")
        self.label_12 = QtWidgets.QLabel(self.dialogsef)
        self.label_12.setGeometry(QtCore.QRect(150, 480, 571, 20))
        self.label_12.setText("")
        self.label_12.setObjectName("label_12")
        self.label_13 = QtWidgets.QLabel(self.dialogsef)
        self.label_13.setGeometry(QtCore.QRect(10, 680, 81, 16))
        self.label_13.setObjectName("label_13")
        self.label_14 = QtWidgets.QLabel(self.dialogsef)
        self.label_14.setGeometry(QtCore.QRect(100, 680, 91, 16))
        self.label_14.setObjectName("label_14")
        self.pushButton_3 = QtWidgets.QPushButton(self.dialogsef)
        self.pushButton_3.setGeometry(QtCore.QRect(150, 480, 75, 23))
        self.pushButton_3.setObjectName("pushButton_3")
        self.pushButton_14 = QtWidgets.QPushButton(self.dialogsef)
        self.pushButton_14.setGeometry(QtCore.QRect(1150, 350, 141, 31))
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_13 = QtWidgets.QPushButton(self.dialogsef)
        self.pushButton_13.setGeometry(QtCore.QRect(1150, 300, 141, 31))
        self.pushButton_13.setObjectName("pushButton_13")
        self.label_15 = QtWidgets.QLabel(self.dialogsef)
        self.label_15.setGeometry(QtCore.QRect(170, 680, 91, 20))
        self.label_15.setObjectName("label_15")
        self.label_16 = QtWidgets.QLabel(self.dialogsef)
        self.label_16.setGeometry(QtCore.QRect(260, 680, 271, 16))
        self.label_16.setObjectName("label_16")

    def self_mention_gui(self):
        clickfun = clickFun()
        self.tab_8 = QtWidgets.QWidget()
        self.tab_8.setObjectName("tab_8")
        self.tabWidget.addTab(self.tab_8, "")

        self.groupBox_self_pick = QtWidgets.QGroupBox(self.tab_8)
        self.groupBox_self_pick.setGeometry(QtCore.QRect(0, 0, 741, 30))
        self.groupBox_self_pick.setCheckable(False)

        self.pushButton_1_self_pick = QtWidgets.QPushButton(
            self.groupBox_self_pick)
        self.pushButton_1_self_pick.setGeometry(QtCore.QRect(20, 2, 81, 23))
        self.pushButton_1_self_pick.setDefault(False)
        self.pushButton_1_self_pick.setFlat(False)
        self.pushButton_1_self_pick.setObjectName("pushButton_1_self_pick")
        self.pushButton_1_self_pick.clicked.connect(lambda: clickfun.self_pick_order(self))
        self.pushButton_2_self_pick = QtWidgets.QPushButton(
            self.groupBox_self_pick)
        self.pushButton_2_self_pick.setGeometry(QtCore.QRect(100, 2, 51, 23))
        self.pushButton_2_self_pick.setDefault(False)
        self.pushButton_2_self_pick.setFlat(False)
        self.pushButton_2_self_pick.setObjectName("pushButton_2_self_pick")
        self.pushButton_2_self_pick.clicked.connect(lambda: clickfun.self_pick_export(self))
        self.pushButton_3_self_pick = QtWidgets.QPushButton(
            self.groupBox_self_pick)
        self.pushButton_3_self_pick.setGeometry(QtCore.QRect(150, 2, 51, 23))
        self.pushButton_3_self_pick.setDefault(False)
        self.pushButton_3_self_pick.setFlat(False)
        self.pushButton_3_self_pick.setObjectName("pushButton_3_self_pick")
        self.pushButton_2_self_pick.clicked.connect(lambda: clickfun.self_pick_clear(self))
        self.tableWidget_self_pick = QtWidgets.QTableWidget(self.tab_8)
        self.tableWidget_self_pick.setGeometry(QtCore.QRect(10, 40, 751, 411))
        self.tableWidget_self_pick.setObjectName("tableWidget_self_pick")
        self.label_self_pick = QtWidgets.QLabel(self.groupBox_self_pick)
        self.label_self_pick.setGeometry(QtCore.QRect(210, 2, 71, 21))
        self.label_self_pick.setAlignment(QtCore.Qt.AlignCenter)
        self.label_self_pick.setObjectName("label")
        self.lineEdit_self_pick = QtWidgets.QLineEdit(self.groupBox_self_pick)
        self.lineEdit_self_pick.setGeometry(QtCore.QRect(290, 5, 91, 21))
        self.lineEdit_self_pick.setObjectName("lineEdit")

        # 给初始化的ui配置数据
        _translate = QtCore.QCoreApplication.translate
        self.dialogsef.setWindowTitle(_translate("Dialog", "也买酒V1.0版"))
        self.pushButton_10.setText(_translate("Dialog", "选中查询登录是否过期"))
        self.pushButton_11.setText(_translate("Dialog", "全选/取消全选"))
        self.pushButton_12.setText(_translate("Dialog", "清空已过期"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab),
                                  _translate("Dialog", "账号登录列表"))
        item = self.tableWidget.horizontalHeaderItem(0)
        item.setText(_translate("Dialog", "账号"))
        item = self.tableWidget.horizontalHeaderItem(1)
        item.setText(_translate("Dialog", "uid"))
        item = self.tableWidget.horizontalHeaderItem(2)
        item.setText(_translate("Dialog", "acc"))
        item = self.tableWidget.horizontalHeaderItem(3)
        item.setText(_translate("Dialog", "old"))
        item = self.tableWidget.horizontalHeaderItem(4)
        item.setText(_translate("Dialog", "预约"))
        item = self.tableWidget.horizontalHeaderItem(5)
        item.setText(_translate("Dialog", "add"))
        item = self.tableWidget.horizontalHeaderItem(6)
        item.setText(_translate("Dialog", "签到"))
        item = self.tableWidget.horizontalHeaderItem(7)
        item.setText(_translate("Dialog", "积分"))
        item = self.tableWidget.horizontalHeaderItem(8)
        item.setText(_translate("Dialog", "地址"))
        item = self.tableWidget.horizontalHeaderItem(9)
        item.setText(_translate("Dialog", "实名"))
        self.groupBox_6.setTitle(_translate("Dialog", "账号注册"))
        self.pushButton_6.setText(_translate("Dialog", "点击登录"))
        self.label_25.setText(_translate("Dialog", "手机号码"))
        self.label_26.setText(_translate("Dialog", "验证码"))
        self.pushButton_15.setText(_translate("Dialog", "发送验证码"))
        self.groupBox_9.setTitle(_translate("Dialog", "输出信息"))
        self.pushButton_18.setText(_translate("Dialog", "清除输出"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2),
                                  _translate("Dialog", "账号注册登录"))
        self.groupBox_2.setTitle(_translate("Dialog", "快代理"))
        self.lineEdit_2.setText(_translate("Dialog", "911638021538727"))
        self.label.setText(_translate("Dialog", "订单号"))
        self.label_2.setText(_translate("Dialog", "APIKEY"))
        self.checkBox_5.setText(_translate("Dialog", "使用快代理"))
        self.label_17.setText(_translate("Dialog", "余量:"))
        self.lineEdit_3.setText(
            _translate("Dialog", "aepu2vixgyf81ackrtm8e0di7jdzqxkv"))
        self.groupBox_4.setTitle(_translate("Dialog", "测试提取(不会计入使用)"))
        self.pushButton_2.setText(_translate("Dialog", "提取测试"))
        self.groupBox_5.setTitle(_translate("Dialog", "提取返回结果"))
        self.pushButton.setText(_translate("Dialog", "余量查询"))
        self.pushButton_20.setText(_translate("Dialog", "请求测试"))
        self.label_45.setText(_translate("Dialog", "是否通过测试:"))
        self.groupBox_3.setTitle(_translate("Dialog", "使用说明"))
        self.label_18.setText(
            _translate("Dialog", "使用快代理的私密代理,建议按量购买,时长建议1-5分钟"))
        self.label_21.setText(_translate("Dialog",
                                         "下单后自行登录快代理网站,查询订单号及APIKEY"))
        self.label_22.setText(_translate("Dialog", "不要设置ip白名单,其他使用查询快代理网站"))
        self.label_23.setText(_translate("Dialog",
                                         "需使用独享代理时需打开独享代理开关并输入独享订单号"))
        self.label_24.setText(_translate("Dialog", "若不需独享代理请关闭独享,独享订单号可不填写"))
        self.label_33.setText(_translate("Dialog", "勾选使用快代理才生效!!!!!"))
        self.label_35.setText(_translate("Dialog", "勾选使用快代理才生效!!!!!"))
        self.label_36.setText(_translate("Dialog", "勾选使用快代理才生效!!!!!"))
        self.groupBox_15.setTitle(_translate("Dialog", "代理列表"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_15),
                                  _translate("Dialog", "代理配置"))
        self.groupBox_8.setTitle(_translate("Dialog", "添加收获地址"))
        self.groupBox_28.setTitle(_translate("Dialog", "填写收货地址"))
        self.label_37.setText(_translate("Dialog", "省市区"))
        self.label_38.setText(_translate("Dialog", "填写XX省XX市XX区"))
        self.label_39.setText(_translate("Dialog", "姓名"))
        self.label_40.setText(_translate("Dialog", "详细地址"))
        self.label_41.setText(_translate("Dialog", "收货手机"))
        self.label_42.setText(_translate("Dialog", "留空使用随机"))
        self.label_43.setText(_translate("Dialog", "留空使用注册手机"))
        self.label_44.setText(_translate("Dialog", "注册手机"))
        self.pushButton_19.setText(_translate("Dialog", "添加地址"))
        self.pushButton_19_all.setText(_translate("Dialog", "获取地址"))
        self.label_52.setText(_translate("Dialog", "手机账号"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_22),
                                  _translate("Dialog", "地址批量"))
        self.groupBox_11.setTitle(_translate("Dialog", "实名信息管理"))
        item = self.tableWidget_17.horizontalHeaderItem(0)
        item.setText(_translate("Dialog", "姓名"))
        item = self.tableWidget_17.horizontalHeaderItem(1)
        item.setText(_translate("Dialog", "身份证号码"))
        item = self.tableWidget_17.horizontalHeaderItem(2)
        item.setText(_translate("Dialog", "状态"))
        self.groupBox_13.setTitle(_translate("Dialog", "操作"))
        self.pushButton_27.setText(_translate("Dialog", "删除选中"))
        self.pushButton_28.setText(_translate("Dialog", "导入信息"))
        self.pushButton_29.setText(_translate("Dialog", "导出信息"))
        self.pushButton_30.setText(_translate("Dialog", "清空列表"))
        self.groupBox_14.setTitle(_translate("Dialog", "未实名用户手机列表"))
        self.groupBox_12.setTitle(_translate("Dialog", "添加实名信息"))
        self.label_29.setText(_translate("Dialog", "姓名:"))
        self.label_30.setText(_translate("Dialog", "身份证号码:"))
        self.pushButton_16.setText(_translate("Dialog", "添加实名信息"))
        self.label_46.setText(_translate("Dialog", "未实名用户手机号"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_20),
                                  _translate("Dialog", "实名"))
        self.groupBox_19.setTitle(_translate("Dialog", "筛选"))
        self.pushButton_17.setText(_translate("Dialog", "全部订单"))
        self.pushButton_23.setText(_translate("Dialog", "待付款"))
        self.pushButton_25.setText(_translate("Dialog", "待配送"))
        self.pushButton_31.setText(_translate("Dialog", "已完成"))
        self.pushButton_33.setText(_translate("Dialog", "已关闭"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_23),
                                  _translate("Dialog", "订单 "))
        self.pushButton_21.setText(_translate("Dialog", "查货"))
        self.pushButton_22.setText(_translate("Dialog", "预约"))
        self.label_47.setText(_translate("Dialog", "地址:"))
        self.label_48.setText(_translate("Dialog", "goods_id:"))
        self.lineEdit_16.setText(_translate("Dialog", "148054"))
        self.label_49.setText(_translate("Dialog", "注册手机号:"))
        self.label_3.setText(_translate("Dialog", "(查询可预约货品)"))
        self.groupBox_18.setTitle(_translate("Dialog", "选中的账号"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5),
                                  _translate("Dialog", "预约查询"))
        self.groupBox_20.setTitle(_translate("Dialog", "选中监控设置"))
        self.label_31.setText(_translate("Dialog", "监控间隔(毫秒)(默认500):"))
        self.pushButton_24.setText(_translate("Dialog", "选中监控下单"))
        self.pushButton_26.setText(_translate("Dialog", "停止监控"))
        self.label_51.setText(_translate("Dialog", "抢购次数(默认1000次):"))
        self.label_32.setText(_translate("Dialog", "监控状态:"))
        self.label_50.setText(_translate("Dialog", "未监控"))
        self.checkBox_6.setText(_translate("Dialog", "使用快代理(先配置测试)"))
        self.groupBox_21.setTitle(_translate("Dialog", "选中修改开始监控时间"))
        self.pushButton_32.setText(_translate("Dialog", "选中修改设置"))
        self.label_54.setText(_translate("Dialog", "设置开始监控时间:"))
        self.dateTimeEdit.setDisplayFormat(
            _translate("Dialog", "yyyy-MM-dd hh:mm:ss"))
        self.pushButton_34.setText(_translate("Dialog", "筛选未过期"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_6),
                                  _translate("Dialog", "已预约"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_7),
                                  _translate("Dialog", "待付款"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_8),
                                  _translate("Dialog", "自提"))
        self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_3),
                                    _translate("Dialog", "日志输出"))
        self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_4),
                                    _translate("Dialog", "成功信息"))
        self.label_13.setText(_translate("Dialog", "程序运行状态:"))
        self.label_14.setText(_translate("Dialog", "正在运行"))
        self.pushButton_3.setText(_translate("Dialog", "清空日志"))
        self.pushButton_14.setText(_translate("Dialog", "预留按钮5"))
        self.pushButton_13.setText(_translate("Dialog", "预留按钮4"))
        self.label_15.setText(_translate("Dialog", "代理使用状态:"))
        self.label_16.setText(_translate("Dialog", "请在代理配置页点击测试(成功后抢购自动使用)"))

        self.label_normal_order.setText(_translate("Object", "商品ID"))
        self.label_2_normal_order.setText(_translate("Object", "下单数"))
        self.pushButton_1_normal_order.setText(_translate("Object", "开始监控下单"))
        self.pushButton_2_normal_order.setText(_translate("Object", "停止监控"))
        self.pushButton_3_normal_order.setText(_translate("Object", "导出"))
        self.pushButton_4_normal_order.setText(_translate("Object", "清空"))
        self.lineEdit_3_normal_order.setText(_translate("Object", "监控状态"))

        self.pushButton_1_self_pick.setText(_translate("Object", "选中自提下单"))
        self.pushButton_2_self_pick.setText(_translate("Object", "导出"))
        self.pushButton_3_self_pick.setText(_translate("Object", "清空"))
        self.label_self_pick.setText(_translate("Object", "自提商品ID"))

        self.tabWidget.currentChanged['int'].connect(lambda: clickfun.tabswitch(self.tabWidget.currentIndex()))  # tab切换绑定
        # 所有按钮点击
        self.pushButton.clicked.connect(lambda: clickfun.tab3click_kuai_yuliang())  # 快代理余量按钮点击
        self.pushButton_2.clicked.connect(lambda: clickfun.tab3click_kuai_test())  # 快代理测试按钮点击
        self.pushButton_15.clicked.connect(lambda: clickfun.tab2click_app_send_sms())  # 注册发送验证码点击
        self.pushButton_6.clicked.connect(lambda: clickfun.tab2click_app_login())  # 登录点击
        self.pushButton_18.clicked.connect(lambda: clickfun.tab2click_clear_log())  # 注册日志清除
        self.pushButton_3.clicked.connect(lambda: clickfun.clear_all_log())  # 窗体日志清除
        self.pushButton_14.clicked.connect(lambda: clickfun.yuliu5_test())  # 预留按钮5
        self.pushButton_11.clicked.connect(lambda: clickfun.account_select_all())  # 全选、取消全选
        self.pushButton_16.clicked.connect(lambda: clickfun.tab4click_app_shiming())  # 选择实名
        self.pushButton_21.clicked.connect(lambda: clickfun.tab6click_chahuo(self))  # 查货
        self.pushButton_22.clicked.connect(lambda: clickfun.tab6click_yuyue())  # 发起预约
        self.pushButton_10.clicked.connect(lambda: clickfun.tab1click_guoqi())  # 选中过期查询
        self.pushButton_12.clicked.connect(lambda: clickfun.tab1click_clear_guoqi())  # 清空过期
        self.pushButton_24.clicked.connect(lambda: clickfun.timer_start())  # 开始监控
        self.pushButton_26.clicked.connect(lambda: clickfun.timer_stop())  # 停止监控
        self.pushButton_19.clicked.connect(lambda: clickfun.addr_add())  # 添加地址
        self.pushButton_19_all.clicked.connect(lambda: clickfun.address_list())  # 添加地址
        self.pushButton_20.clicked.connect(lambda: clickfun.proxy_test())  # 代理测试
        self.pushButton_32.clicked.connect(lambda: clickfun.stimer_change())  # 选中修改设置
        self.pushButton_34.clicked.connect(lambda: clickfun.shaixuan_yuyue_succ())  # 筛选未过期

        self.pushButton_17.clicked.connect(lambda: clickfun.order_qb())  # 全部
        self.pushButton_23.clicked.connect(lambda: clickfun.order_fk())  # 代付款
        self.pushButton_25.clicked.connect(lambda: clickfun.order_ps())  # 待配送
        self.pushButton_31.clicked.connect(lambda: clickfun.order_wc())  # 已完成
        self.pushButton_33.clicked.connect(lambda: clickfun.order_gb())  # 已关闭

        self.comboBox_3.currentIndexChanged[int].connect(lambda: clickfun.addr_get())
        self.timer_logger.timeout.connect(lambda: clickfun.set_log_out_exe(self))
        self.timer_logger.start(2000)

        self.timer_exec_yuan.timeout.connect(lambda: clickfun.send_yuan_check())
        self.timer_exec_yuan.start(1800 * 1000)
        # 信号
        clickfun.user_list(self)
        self.tabWidget.setCurrentIndex(0)
        self.tabWidget_2.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(self.dialogsef)

    def account_import(self):
        current_path = os.getcwd()
        filename = QFileDialog.getOpenFileName(self.groupBox_7, 'Open file',
                                               current_path,
                                               "Excel Files (*.xlsx)")

        if filename[0] != '':
            self.account_file = filename[0]
            df = pd.read_excel(self.account_file)  # 读取数据文件
            height, width = df.shape
            xf = 0
            while (xf < height):
                userid = df.iloc[xf, 0]
                mobile = df.iloc[xf, 1]
                access_token = df.iloc[xf, 2]
                userinfo = get_userlogin_mobile(mobile)
                if userinfo:
                    print("已录入")
                else:
                    create_user_login_success(mobile, access_token, userid,
                                              "是", 0)
                xf += 1
            self.user_list('YES')
            pass

    def timer_create(self):
        self.timer_jiankong = QtCore.QTimer()
        self.timer_jiankong2 = QtCore.QTimer()
        self.timer_jiankong3 = QtCore.QTimer()
        self.timer_jiankong4 = QtCore.QTimer()
        self.timer_jiankong5 = QtCore.QTimer()
        self.timer_logger = QtCore.QTimer()
        self.timer_exec_yuan = QtCore.QTimer()

        self.jiankong_list_num = 3
        self.jiankong_list = []
        self.jiankong_list2 = []
        self.jiankong_list3 = []
        self.jiankong_list4 = []
        self.jiankong_list5 = []

        self.jiankong_cishu = 0
        self.jiankong_cishu2 = 0
        self.jiankong_cishu3 = 0
        self.jiankong_cishu4 = 0
        self.jiankong_cishu5 = 0

        self.use_proxy = False
        self.proxy_order_id = None
        self.proxy_api_key = None
        self.qianggou_cishu = 1000
        self.qianggou_jiange = 500

